<!DOCTYPE html>
<html>
#{include file="header.html"}#
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal" method="post" action="#">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">员工编号</label>
                            <div class="col-sm-8">
                                <input name="staff_no" class="form-control" type="text" placeholder="请输入员工编号" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">员工姓名</label>
                            <div class="col-sm-8">
                                <input name="name" class="form-control" type="text" placeholder="请输入员工姓名" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">姓别</label>
                            <div class="col-sm-8">
                                <div class="radio i-checks">
                                    <input type="radio" name="gender" value="1" checked="checked"/> 男
                                    <input type="radio" name="gender" value="2"/> 女
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">年龄</label>
                            <div class="col-sm-8">
                                <input name="age" class="form-control" type="text" placeholder="请输入员工年龄" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">部门</label>
                            <div class="col-sm-8">
                                <select name="dept_id" class="chosen-select" style="width: 200px;" tabindex="2">
                                    <option value="">选择部门</option>
                                    #{foreach from=$dept key=k item=v}#
                                    <option value="#{$v.id}#" #{if $v.id eq $one.deptID}# selected #{
                                    /if}#>#{$v.treename}#</option>
                                    #{/foreach}#
                                </select>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">职位</label>
                            <div class="col-sm-8">
                                <select name="position_id" class="form-control chosen-select" style="width: 200px;" tabindex="2">
                                    <option value="">选择职位</option>
                                    #{foreach from=$position key=k item=v}#
                                    <option value="#{$v.id}#" #{if $v.id eq $one.positionID}# selected #{
                                    /if}#>#{$v.treename}#</option>
                                    #{/foreach}#
                                </select>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">身份证号</label>
                            <div class="col-sm-8">
                                <input name="idcard" class="form-control" type="text" placeholder="请输入身份证号" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">婚姻情况</label>
                            <div class="col-sm-8">
                                <input name="marriage" class="form-control" type="text" placeholder="请输入婚姻情况" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">政治面貌</label>
                            <div class="col-sm-8">
                                <input name="politics" class="form-control" type="text" placeholder="请输入政治面貌" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">最高学历</label>
                            <div class="col-sm-8">
                                <input name="degree" class="form-control" type="text" placeholder="请输入最高学历" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">就读专业</label>
                            <div class="col-sm-8">
                                <input name="major" class="form-control" type="text" placeholder="请输入就读专业" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">职业资格</label>
                            <div class="col-sm-8">
                                <input name="qualification" class="form-control" type="text" placeholder="请输入职业资格"
                                       required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">工作职务</label>
                            <div class="col-sm-8">
                                <input name="position" class="form-control" type="text" placeholder="请输入工作职务" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">社会职务</label>
                            <div class="col-sm-8">
                                <input name="social" class="form-control" type="text" placeholder="请输入社会职务" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">员工姓名</label>
                            <div class="col-sm-8">
                                <input name="name" class="form-control" type="text" placeholder="请输入员工姓名" required/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">手机</label>
                            <div class="col-sm-8">
                                <input name="mobile" class="form-control" type="text" placeholder="输入手机号"/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">QQ</label>
                            <div class="col-sm-8">
                                <input name="qicq" class="form-control" type="text" placeholder="输入QQ号码"/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">邮箱</label>
                            <div class="col-sm-8">
                                <input name="email" class="form-control" type="email" placeholder="输入邮箱地址"/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">联系地址</label>
                            <div class="col-sm-8">
                                <input name="address" class="form-control" type="email" placeholder="输入联系地址"/>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">介绍</label>
                            <div class="col-sm-8">
                                <textarea name="intro" class="form-control" cols="80" rows="2">#{$one.intro}#</textarea>
                                <span class="help-block m-b-none"></span></div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-8">
                                <button class="btn  btn-w-m btn-info save-form" type="button">保存数据</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="#{$smarty.const.APP}#/View/template/js/content.js?v=1.0.0"></script>
<script>
    $(document).ready(function () {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
        //数据保存
        $("body").on("click", ".save-form", function () {
            FormData = $("form").serialize();
            $.ajax({
                type: "POST",
                url: "#{$smarty.const.ACT}#/hrm/HrmStaff/hrm_staff_add/",
                data: FormData,
                dataType: "json",
                success: function (data) {
                    if (data.statusCode == '200') {
                        layer.msg('操作成功', {icon: 1});
                    }
                },
                complete: function () {
                    setTimeout(function () {
                        //关闭窗口
                        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                        parent.layer.close(index);
                    }, 800);
                },
            });
        });
    });
</script>
</body>
</html>
